#!/usr/bin/env bash

cat > /etc/systemd/system/webssh.service << EOF
[Unit]
Description=webssh service
After=syslog.target network.target remote-fs.target nss-lookup.target

[Service]
User=%{app_user}
WorkingDirectory=/usr/local/webssh/
ExecStart=/usr/local/webssh/webssh-exec.jar
SuccessExitStatus=143

[Install]
WantedBy=multi-user.target
EOF

chmod 640 /etc/systemd/system/webssh.service
